//
// Decompiled with: Decompiler.NET, Version=1.3.1.18439, Culture=neutral, PublicKeyToken=null, Version: 1.3.1.18439
// Decompilation Started at: 3/15/2009 10:34:26 PM
// Copyright 2003 - 2004, Jungle Creatures, Inc., All Rights Reserved. 
// Written by Jonathan Pierce, Email: support@junglecreatures.com
//

namespace PatientManagement

{
		
		#region Namespace Import Declarations
		
			using System.Collections;
			using System.ComponentModel;
			using System.Data.Common;
			using System.Data;
			using System.Data.SqlClient;
			using System.Drawing;
			using System;
			using System.Resources;
			using System.Windows.Forms;
			using Utility;
			
		#endregion
		
	public class frmYTaLapMoi : Form
	
	{
		
		#region Fields
			private string _clrISN;
			private string _NhanBiet;
			private string _patISN;
			private Button btAdd;
			private Button btLuuBenhAn;
			private Button btRemove;
			private Button btReset;
			private Button btTaiKham;
			private Button btThoat;
			private ComboBox cbLanKham;
			private ComboBox cboTaiKham;
			private string clrISN;
			private IContainer components;
			private string connStr;
			private Database_Com db;
			private DateTimePicker dtpBirthDay;
			private GroupBox groupBox1;
			private GroupBox groupBox2;
			private GroupBox groupBox3;
			private GroupBox groupBox4;
			private Label label1;
			private Label label10;
			private Label label11;
			private Label label12;
			private Label label13;
			private Label label14;
			private Label label15;
			private Label label16;
			private Label label17;
			private Label label19;
			private Label label2;
			private Label label21;
			private Label label3;
			private Label label4;
			private Label label5;
			private Label label6;
			private Label label7;
			private Label label8;
			private Label label9;
			private ListView listView1;
			private TreeNode node;
			private RadioButton rbFemale;
			private RadioButton rbMale;
			private TextBox tbAddress;
			private TextBox tbBenhNgoaiDS;
			public TextBox tbBenhSu;
			private TextBox tbCanNang;
			private TextBox tbDiDong;
			private TextBox tbFullName;
			private TextBox tbHuyetAp;
			private TextBox tbID;
			private TextBox tbJob;
			private TextBox tbLanKham;
			private TextBox tbMach;
			private TextBox tbNhietDo;
			private TextBox tbPhone;
			private TextBox tbTuoi;
			private ToolTip toolTip1;
			private TreeView treeView1;
			private TextBox txtTaiKham;
		#endregion
		
		#region Constructors
		
			public frmYTaLapMoi (string clrISN, string NhanBiet, string PatISN)
			
			{
				this.db = new Database_Com ();
				this.InitializeComponent ();
				this._clrISN = clrISN;
				this._NhanBiet = NhanBiet;
				this._patISN = PatISN;
				this.connStr = Connection.ConnectionString ();
				return;
			}
			
		#endregion
		
		#region Methods
		
			private void btAdd_Click (object sender, EventArgs e)
			
			{
				this.treeView1_DoubleClick (sender, e);
				return;
			}
			
			private void btLuuBenhAn_Click (object sender, EventArgs e)
			
			{
				string theString;
				string theString2;
				string theString3;
				string theString4;
				string theString5;
				SqlConnection theSqlConnection;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				DataTable theDataTable;
				ArrayList theArrayList;
				ArrayList theArrayList2;
				ArrayList theArrayList3;
				int i;
				int i2;
				string theString6;
				string theString7;
				int i3;
				SqlCommand theSqlCommand;
				SqlParameter theSqlParameter;
				SqlDataAdapter theSqlDataAdapter2;
				DataSet theDataSet2;
				DataTable theDataTable2;
				int i4;
				SqlCommand theSqlCommand2;
				string theString8;
				DateTime theDateTime;
				int i5;
				SqlDataAdapter theSqlDataAdapter3;
				DataSet theDataSet3;
				ArrayList theArrayList4;
				int i6;
				string theString9;
				SqlCommand theSqlCommand3;
				SqlDataAdapter theSqlDataAdapter4;
				DataSet theDataSet4;
				ArrayList theArrayList5;
				int i7;
				SqlCommand theSqlCommand4;
				SqlParameter theSqlParameter2;
				SqlDataAdapter theSqlDataAdapter5;
				DataSet theDataSet5;
				DataTable theDataTable3;
				int i8;
				SqlCommand theSqlCommand5;
				Color theColor;
				string[] theStringArray;
				string[] theStringArray2;
				SqlDbType[] theSqlDbTypeArray;
				object[] theObjectArray;
				object[] theObjectArray2;
				string[] theStringArray3;
				SqlDbType[] theSqlDbTypeArray2;
				object[] theObjectArray3;
				string[] theStringArray4;
				string[] theStringArray5;
				SqlDbType[] theSqlDbTypeArray3;
				object[] theObjectArray4;
				string[] theStringArray6;
				SqlDbType[] theSqlDbTypeArray4;
				object[] theObjectArray5;
				if (! this.CheckData ())
				{
					goto L_0D2D;
				}
				if (this.tbPhone.Text.Length <= 0)
				{
					goto L_004E;
				}
				if (this.IsNumber (this.tbPhone.Text.ToString ()))
				{
					goto L_004E;
				}
				DialogResult theDialogResult = MessageBox.Show ("S? ?i?n tho?i kh?ng h?p l?", "L?i nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_0D2D;
				
			L_004E:
				
				{
				}
				if (this.tbDiDong.Text.Length <= 0)
				{
					goto L_0091;
				}
				if (this.IsNumber (this.tbDiDong.Text.ToString ()))
				{
					goto L_0091;
				}
				DialogResult theDialogResult2 = MessageBox.Show ("S? ?i?n tho?i di ??ng kh?ng h?p l?", "L?i nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_0D2D;
				
			L_0091:
				
				{
				}
				if (this.tbMach.Text.Length <= 0)
				{
					goto L_00E7;
				}
				if (this.IsNumber (this.tbMach.Text.ToString ()))
				{
					goto L_00D4;
				}
				DialogResult theDialogResult3 = MessageBox.Show ("M?ch kh?ng h?p l?", "L?i nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_0D2D;
				
			L_00D4:
				
				{
				}
				theString = this.tbMach.Text.ToString ();
				goto L_00ED;
				
			L_00E7:
				
				{
				}
				theString = "0";
				
			L_00ED:
				
				{
				}
				if (this.tbNhietDo.Text.Length <= 0)
				{
					goto L_0143;
				}
				if (this.IsFloat (this.tbNhietDo.Text.ToString ()))
				{
					goto L_0130;
				}
				DialogResult theDialogResult4 = MessageBox.Show ("Nhi?t ?? kh?ng h?p l?", "L?i nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_0D2D;
				
			L_0130:
				
				{
				}
				theString2 = this.tbNhietDo.Text.ToString ();
				goto L_0149;
				
			L_0143:
				
				{
				}
				theString2 = "0";
				
			L_0149:
				
				{
				}
				if (this.tbCanNang.Text.Length <= 0)
				{
					goto L_019F;
				}
				if (this.IsFloat (this.tbCanNang.Text.ToString ()))
				{
					goto L_018C;
				}
				DialogResult theDialogResult5 = MessageBox.Show ("C?n n?ng kh?ng h?p l?", "L?i nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_0D2D;
				
			L_018C:
				
				{
				}
				theString4 = this.tbCanNang.Text.ToString ();
				goto L_01A5;
				
			L_019F:
				
				{
				}
				theString4 = "0";
				
			L_01A5:
				
				{
				}
				theString3 = this.tbHuyetAp.Text.ToString ();
				this.dtpBirthDay.CustomFormat = "MM/dd/yyyy";
				
			L_01DF:
				
				{
				}
				
			L_01DA:
				
				{
				}
				theString5 = (this.rbMale.Checked ? "Nam" : "N?");
				theSqlConnection = new SqlConnection (this.connStr);
				theSqlDataAdapter = new SqlDataAdapter ("Select IDENT_CURRENT(\'ClinicalRecord\')", theSqlConnection);
				theDataSet = new DataSet ();
				int i9 = theSqlDataAdapter.Fill (theDataSet, "ClinicalRecord");
				theDataTable = theDataSet.Tables["ClinicalRecord"];
				this.clrISN = Convert.ToString (((int) (int.Parse (theDataTable.Rows[0][0].ToString ()) + 1)));
				theSqlDataAdapter.Dispose ();
				theSqlConnection.Close ();
				theArrayList = new ArrayList ();
				theArrayList2 = new ArrayList ();
				theArrayList3 = new ArrayList ();
				i = this.listView1.Items.Count;
				i2 = 0;
				goto L_036D;
				
			L_028C:
				
				{
				}
				theString6 = this.listView1.Items[i2].Text.ToString ();
				theString7 = (theColor = this.listView1.Items[i2].ForeColor).Name.ToString ();
				if (theString7 != "Red")
				{
					goto L_02ED;
				}
				int i10 = theArrayList3.Add (0);
				
			L_02ED:
				
				{
				}
				if (theString7 != "Blue")
				{
					goto L_0309;
				}
				int i11 = theArrayList3.Add (1);
				
			L_0309:
				
				{
				}
				if (theString7 != "Purple")
				{
					goto L_0325;
				}
				int i12 = theArrayList3.Add (2);
				
			L_0325:
				
				{
				}
				if (theString7 != "Green")
				{
					goto L_0341;
				}
				int i13 = theArrayList3.Add (3);
				
			L_0341:
				
				{
				}
				if (theString7 != "Gray")
				{
					goto L_035D;
				}
				int i14 = theArrayList3.Add (4);
				
			L_035D:
				
				{
				}
				int i15 = theArrayList.Add (theString6);
				i2++;
				
			L_036D:
				
				{
				}
				if (i2 < i)
				{
					goto L_028C;
				}
				i3 = 0;
				goto L_041D;
				
			L_037E:
				
				{
				}
				theSqlCommand = new SqlCommand ("SELECT * FROM Sicks WHERE sckName=@sckName", theSqlConnection);
				theSqlParameter = new SqlParameter ("@sckName", SqlDbType.NVarChar);
				theSqlParameter.Value = theArrayList[i3].ToString ();
				SqlParameter theSqlParameter3 = theSqlCommand.Parameters.Add (theSqlParameter);
				theSqlDataAdapter2 = new SqlDataAdapter (theSqlCommand);
				theDataSet2 = new DataSet ();
				int i16 = theSqlDataAdapter2.Fill (theDataSet2, "Sicks");
				theDataTable2 = theDataSet2.Tables["Sicks"];
				int i17 = theArrayList2.Add (theDataTable2.Rows[0][0].ToString ());
				theSqlDataAdapter2.Dispose ();
				i3++;
				
			L_041D:
				
				{
				}
				if (i3 < theArrayList.Count)
				{
					goto L_037E;
				}
				i4 = 0;
				goto L_04C3;
				
			L_0433:
				
				{
				}
				theStringArray = new string[7];
				theStringArray[0] = "INSERT INTO ClinicalSicks VALUES(";
				theStringArray[1] = theArrayList2[i4].ToString ();
				theStringArray[2] = ", ";
				theStringArray[3] = this.clrISN;
				theStringArray[4] = ",";
				theStringArray[5] = theArrayList3[i4].ToString ();
				theStringArray[6] = ")";
				theSqlCommand2 = new SqlCommand (string.Concat (theStringArray), theSqlConnection);
				theSqlCommand2.Connection.Open ();
				int i18 = theSqlCommand2.ExecuteNonQuery ();
				theSqlCommand2.Connection.Close ();
				i4++;
				
			L_04C3:
				
				{
				}
				if (i4 < theArrayList2.Count)
				{
					goto L_0433;
				}
				theString8 = string.Empty;
				if (! this.txtTaiKham.Text.Equals ("0"))
				{
					goto L_04F8;
				}
				theString8 = "0";
				goto L_04FF;
				
			L_04F8:
				
				{
				}
				theString8 = "1";
				
			L_04FF:
				
				{
				}
				SqlConnection theSqlConnection2 = this.db.CreateConnections ();
				theDateTime = ((DateTime) this.db.ExecuteScalar ("select getDate()"));
				theStringArray2 = new string[27];
				theStringArray2[0] = "@patID";
				theStringArray2[1] = "@patName";
				theStringArray2[2] = "@patBirthDate";
				theStringArray2[3] = "@patAge";
				theStringArray2[4] = "@patSex";
				theStringArray2[5] = "@patAddress";
				theStringArray2[6] = "@patTel";
				theStringArray2[7] = "@patOccupation";
				theStringArray2[8] = "@empISN";
				theStringArray2[9] = "@clrPulse";
				theStringArray2[10] = "@clrTemperature";
				theStringArray2[11] = "@clrBloodPressure";
				theStringArray2[12] = "@clrWeigh";
				theStringArray2[13] = "@clrMedicalHistory";
				theStringArray2[14] = "@clrTest";
				theStringArray2[15] = "@clrSickNotInList";
				theStringArray2[16] = "@clrExaminationTimes";
				theStringArray2[17] = "@clrExaminationDate";
				theStringArray2[18] = "@clrSkill";
				theStringArray2[19] = "@clrMedicalAdvice";
				theStringArray2[20] = "@clrFollowUpExaminationDate";
				theStringArray2[21] = "@clrPicture";
				theStringArray2[22] = "@clrSurgery";
				theStringArray2[23] = "@patMobile";
				theStringArray2[24] = "@clrSickHistory";
				theStringArray2[25] = "@clrRexaminationTimes";
				theStringArray2[26] = "@clrRexaminationStatus";
				theSqlDbTypeArray = new SqlDbType[27];
				theSqlDbTypeArray[0] = SqlDbType.VarChar;
				theSqlDbTypeArray[1] = SqlDbType.NVarChar;
				theSqlDbTypeArray[2] = SqlDbType.DateTime;
				theSqlDbTypeArray[3] = SqlDbType.TinyInt;
				theSqlDbTypeArray[4] = SqlDbType.NVarChar;
				theSqlDbTypeArray[5] = SqlDbType.NVarChar;
				theSqlDbTypeArray[6] = SqlDbType.NVarChar;
				theSqlDbTypeArray[7] = SqlDbType.NVarChar;
				theSqlDbTypeArray[8] = SqlDbType.Int;
				theSqlDbTypeArray[9] = SqlDbType.Float;
				theSqlDbTypeArray[10] = SqlDbType.Float;
				theSqlDbTypeArray[11] = SqlDbType.VarChar;
				theSqlDbTypeArray[12] = SqlDbType.Float;
				theSqlDbTypeArray[13] = SqlDbType.NVarChar;
				theSqlDbTypeArray[14] = SqlDbType.NVarChar;
				theSqlDbTypeArray[15] = SqlDbType.NVarChar;
				theSqlDbTypeArray[16] = SqlDbType.Int;
				theSqlDbTypeArray[17] = SqlDbType.DateTime;
				theSqlDbTypeArray[18] = SqlDbType.NVarChar;
				theSqlDbTypeArray[19] = SqlDbType.NVarChar;
				theSqlDbTypeArray[20] = SqlDbType.DateTime;
				theSqlDbTypeArray[21] = SqlDbType.VarChar;
				theSqlDbTypeArray[22] = SqlDbType.NVarChar;
				theSqlDbTypeArray[23] = SqlDbType.NVarChar;
				theSqlDbTypeArray[24] = SqlDbType.NVarChar;
				theSqlDbTypeArray[25] = SqlDbType.Int;
				theSqlDbTypeArray[26] = SqlDbType.TinyInt;
				theObjectArray = new object[27];
				theObjectArray[0] = this.tbID.Text.ToString ();
				theObjectArray[1] = this.tbFullName.Text.ToString ();
				theObjectArray[2] = this.dtpBirthDay.Text;
				theObjectArray[3] = this.tbTuoi.Text.ToString ();
				theObjectArray[4] = theString5;
				theObjectArray[5] = this.tbAddress.Text.ToString ();
				theObjectArray[6] = this.tbPhone.Text.ToString ();
				theObjectArray[7] = this.tbJob.Text.ToString ();
				theObjectArray[8] = "1";
				theObjectArray[9] = theString;
				theObjectArray[10] = theString2;
				theObjectArray[11] = theString3;
				theObjectArray[12] = theString4;
				theObjectArray[13] = this.tbBenhSu.Text.ToString ();
				theObjectArray[14] = "";
				theObjectArray[15] = this.tbBenhNgoaiDS.Text.ToString ();
				theObjectArray[16] = this.tbLanKham.Text.ToString ();
				theObjectArray[17] = theDateTime.ToString ();
				theObjectArray[18] = "";
				theObjectArray[19] = "";
				theObjectArray[20] = "2004/01/01";
				theObjectArray[21] = "";
				theObjectArray[22] = "";
				theObjectArray[23] = this.tbDiDong.Text.ToString ();
				theObjectArray[24] = "";
				theObjectArray[25] = this.txtTaiKham.Text;
				theObjectArray[26] = theString8;
				this.db.ExecuteStoredProc ("sp_Patients_ClinicalRecordNurse_Insert", theStringArray2, theSqlDbTypeArray, theObjectArray);
				if (theString8 != "1")
				{
					goto L_0CFE;
				}
				i5 = 0;
				if (int.Parse (this.txtTaiKham.Text) <= 1)
				{
					goto L_08AE;
				}
				i5 = (int.Parse (this.txtTaiKham.Text) - 1);
				
			L_08AE:
				
				{
				}
				theObjectArray2 = new object[6];
				theObjectArray2[0] = "SELECT * FROM vw_PathologicalClinical WHERE clrExaminationTimes=";
				theObjectArray2[1] = this.tbLanKham.Text;
				theObjectArray2[2] = " AND patID = \'";
				theObjectArray2[3] = this.tbID.Text;
				theObjectArray2[4] = "\' and clrRexaminationTimes = ";
				theObjectArray2[5] = i5;
				theSqlDataAdapter3 = new SqlDataAdapter (string.Concat (theObjectArray2), theSqlConnection);
				theDataSet3 = new DataSet ();
				int i19 = theSqlDataAdapter3.Fill (theDataSet3, "vw_PathologicalClinical");
				theSqlDataAdapter3.Dispose ();
				if ((theDataSet3 != null) && (theDataSet3.Tables["vw_PathologicalClinical"].Rows[0]["plsPathologicalSigns"].ToString () != ""))
				{
					goto L_097F;
				}
				
			L_0962:
				
				{
				}
				this.btLuuBenhAn.Enabled = false;
				this.btTaiKham.Enabled = false;
				goto L_0D2D;
				
			L_097F:
				
				{
				}
				theArrayList4 = new ArrayList ();
				i6 = 0;
				goto L_09C5;
				
			L_098B:
				
				{
				}
				int i20 = theArrayList4.Add (theDataSet3.Tables["vw_PathologicalClinical"].Rows[i6]["plsPathologicalSigns"].ToString ());
				i6++;
				
			L_09C5:
				
				{
				}
				if (i6 < theDataSet3.Tables["vw_PathologicalClinical"].Rows.Count)
				{
					goto L_098B;
				}
				theString9 = theDataSet3.Tables["vw_PathologicalClinical"].Rows[0]["polPathologicalSignsOutList"].ToString ();
				theSqlCommand3 = new SqlCommand (string.Concat ("DELETE PathologicalClinical WHERE clrISN=", this.clrISN), theSqlConnection);
				theSqlCommand3.Connection.Open ();
				int i21 = theSqlCommand3.ExecuteNonQuery ();
				theSqlCommand3.Connection.Close ();
				theSqlDataAdapter4 = new SqlDataAdapter (string.Concat ("SELECT * FROM PathologicalOutList WHERE clrISN=", this.clrISN), theSqlConnection);
				theDataSet4 = new DataSet ();
				int i22 = theSqlDataAdapter4.Fill (theDataSet4, "PathologicalOutList");
				if ((theDataSet4 != null) && ((theDataSet4.Tables.Count != 0) && (theDataSet4.Tables[0].Rows.Count != 0)))
				{
					goto L_0B0B;
				}
				
			L_0AA4:
				
				{
				}
				SqlConnection theSqlConnection3 = this.db.CreateConnections ();
				theStringArray3 = new string[2];
				theStringArray3[0] = "@clrISN";
				theStringArray3[1] = "@polPathologicalSignsOutList";
				theSqlDbTypeArray2 = new SqlDbType[2];
				theSqlDbTypeArray2[0] = SqlDbType.Int;
				theSqlDbTypeArray2[1] = SqlDbType.NVarChar;
				theObjectArray3 = new object[2];
				theObjectArray3[0] = this.clrISN;
				theObjectArray3[1] = theString9;
				this.db.ExecuteStoredProc ("sp_PathologicalOutList_Insert", theStringArray3, theSqlDbTypeArray2, theObjectArray3);
				
			L_0B0B:
				
				{
				}
				theArrayList5 = new ArrayList ();
				i7 = 0;
				goto L_0BB2;
				
			L_0B1A:
				
				{
				}
				theSqlCommand4 = new SqlCommand ("SELECT * FROM PathologicalSigns WHERE plsPathologicalSigns=@plsPathologicalSigns", theSqlConnection);
				theSqlParameter2 = new SqlParameter ("@plsPathologicalSigns", SqlDbType.NVarChar);
				theSqlParameter2.Value = theArrayList4[i7].ToString ();
				SqlParameter theSqlParameter4 = theSqlCommand4.Parameters.Add (theSqlParameter2);
				theSqlDataAdapter5 = new SqlDataAdapter (theSqlCommand4);
				theDataSet5 = new DataSet ();
				int i23 = theSqlDataAdapter5.Fill (theDataSet5, "PathologicalSigns");
				theDataTable3 = theDataSet5.Tables["PathologicalSigns"];
				int i24 = theArrayList5.Add (theDataTable3.Rows[0][0].ToString ());
				i7++;
				
			L_0BB2:
				
				{
				}
				if (i7 < theArrayList4.Count)
				{
					goto L_0B1A;
				}
				i8 = 0;
				goto L_0C3A;
				
			L_0BC5:
				
				{
				}
				theStringArray4 = new string[5];
				theStringArray4[0] = "INSERT INTO PathologicalClinical VALUES(";
				theStringArray4[1] = this.clrISN;
				theStringArray4[2] = ", ";
				theStringArray4[3] = theArrayList5[i8].ToString ();
				theStringArray4[4] = ")";
				theSqlCommand5 = new SqlCommand (string.Concat (theStringArray4), theSqlConnection);
				theSqlCommand5.Connection.Open ();
				int i25 = theSqlCommand5.ExecuteNonQuery ();
				theSqlCommand5.Connection.Close ();
				i8++;
				
			L_0C3A:
				
				{
				}
				if (i8 < theArrayList5.Count)
				{
					goto L_0BC5;
				}
				SqlConnection theSqlConnection4 = this.db.CreateConnections ();
				theStringArray5 = new string[2];
				theStringArray5[0] = "@clrISN";
				theStringArray5[1] = "@polPathologicalSignsOutList";
				theSqlDbTypeArray3 = new SqlDbType[2];
				theSqlDbTypeArray3[0] = SqlDbType.Int;
				theSqlDbTypeArray3[1] = SqlDbType.NVarChar;
				theObjectArray4 = new object[2];
				theObjectArray4[0] = this.clrISN;
				theObjectArray4[1] = theString9;
				this.db.ExecuteStoredProc ("sp_PathologicalOutList_Update", theStringArray5, theSqlDbTypeArray3, theObjectArray4);
				SqlConnection theSqlConnection5 = this.db.CreateConnections ();
				theStringArray6 = new string[1];
				theStringArray6[0] = "@clrISN";
				theSqlDbTypeArray4 = new SqlDbType[1];
				theSqlDbTypeArray4[0] = SqlDbType.Int;
				theObjectArray5 = new object[1];
				theObjectArray5[0] = this.clrISN;
				this.db.ExecuteStoredProc ("sp_ClinicalPathologicalSign_Update", theStringArray6, theSqlDbTypeArray4, theObjectArray5);
				
			L_0CFE:
				
				{
				}
				this.btLuuBenhAn.Enabled = false;
				this.dtpBirthDay.CustomFormat = "dd/MM/yyyy";
				DialogResult theDialogResult6 = MessageBox.Show ("H? s? b?nh ?n ?? ???c l?u", "L?u h? s? b?nh ?n th?nh c?ng", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				
			L_0D2D:
				return;
			}
			
			private void btRemove_Click (object sender, EventArgs e)
			
			{
				this.listView1_DoubleClick (sender, e);
				return;
			}
			
			private void btReset_Click (object sender, EventArgs e)
			
			{
				int i;
				this.rbMale.Checked = true;
				this.tbBenhNgoaiDS.Text = "";
				this.tbMach.Text = "";
				this.tbNhietDo.Text = "";
				this.tbHuyetAp.Text = "";
				this.tbCanNang.Text = "";
				this.btLuuBenhAn.Enabled = true;
				this.tbLanKham.Visible = true;
				this.cbLanKham.Visible = false;
				i = this.cbLanKham.Items.Count;
				this.cbLanKham.SelectedIndex = (i - 1);
				this.tbLanKham.Text = Convert.ToString (((int) (short.Parse (this.cbLanKham.Text) + 1)));
				this.listView1.Items.Clear ();
				this.cboTaiKham.Visible = false;
				this.txtTaiKham.Visible = true;
				this.txtTaiKham.Text = "0";
				this.btTaiKham.Enabled = false;
				this.btReset.Enabled = false;
				return;
			}
			
			private void btTaiKham_Click (object sender, EventArgs e)
			
			{
				int i;
				int i2;
				int i3;
				int i4;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				object[] theObjectArray;
				this.rbMale.Checked = true;
				this.tbBenhNgoaiDS.Text = "";
				this.tbMach.Text = "";
				this.tbNhietDo.Text = "";
				this.tbHuyetAp.Text = "";
				this.tbCanNang.Text = "";
				this.btLuuBenhAn.Enabled = true;
				this.tbLanKham.Visible = true;
				this.cbLanKham.Visible = false;
				this.tbLanKham.Text = this.cbLanKham.Text;
				if (! this.txtTaiKham.Visible)
				{
					goto L_00C8;
				}
				this.txtTaiKham.Text = (i = (int.Parse (this.txtTaiKham.Text) + 1)).ToString ();
				
			L_00C8:
				
				{
				}
				if (! this.cboTaiKham.Visible)
				{
					goto L_0141;
				}
				i2 = this.cbLanKham.FindString (this.tbLanKham.Text);
				this.cbLanKham.SelectedIndex = i2;
				this.cbLanKham_SelectedIndexChanged (null, ((EventArgs) null));
				i3 = this.cboTaiKham.Items.Count;
				this.cboTaiKham.SelectedIndex = (i3 - 1);
				this.txtTaiKham.Text = Convert.ToString (((int) (int.Parse (this.cboTaiKham.Text) + 1)));
				
			L_0141:
				
				{
				}
				this.txtTaiKham.Visible = true;
				this.cboTaiKham.Visible = false;
				this.btReset.Enabled = false;
				this.btTaiKham.Enabled = false;
				i4 = 0;
				if (int.Parse (this.txtTaiKham.Text) <= 1)
				{
					goto L_0199;
				}
				i4 = (int.Parse (this.txtTaiKham.Text) - 1);
				
			L_0199:
				
				{
				}
				theObjectArray = new object[6];
				theObjectArray[0] = "SELECT * FROM vw_PathologicalClinical WHERE clrExaminationTimes=";
				theObjectArray[1] = this.tbLanKham.Text;
				theObjectArray[2] = " AND patID = \'";
				theObjectArray[3] = this.tbID.Text;
				theObjectArray[4] = "\' and clrRexaminationTimes = ";
				theObjectArray[5] = i4;
				theSqlDataAdapter = new SqlDataAdapter (string.Concat (theObjectArray), this.connStr);
				theDataSet = new DataSet ();
				int i5 = theSqlDataAdapter.Fill (theDataSet, "vw_PathologicalClinical");
				theSqlDataAdapter.Dispose ();
				if (theDataSet == null)
				{
					goto L_0250;
				}
				if (theDataSet.Tables["vw_PathologicalClinical"].Rows[0]["plsPathologicalSigns"].ToString () != "")
				{
					goto L_027D;
				}
				
			L_0250:
				
				{
				}
				DialogResult theDialogResult = MessageBox.Show ("Kh?ng th? t?i kh?m ti?p khi b?nh ?n ch?a ???c b?c s? th?ng qua", "Th?ng B?o", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				this.btLuuBenhAn.Enabled = false;
				this.btTaiKham.Enabled = false;
				goto L_027D;
				
			L_027D:
				return;
			}
			
			private void btThoat_Click (object sender, EventArgs e)
			
			{
				base.Close ();
				return;
			}
			
			private void cbLanKham_SelectedIndexChanged (object sender, EventArgs e)
			
			{
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				int i;
				SqlDataAdapter theSqlDataAdapter2;
				DataSet theDataSet2;
				DataTable theDataTable;
				SqlDataAdapter theSqlDataAdapter3;
				DataSet theDataSet3;
				int i2;
				ListViewItem theListViewItem;
				string theString;
				string[] theStringArray;
				ListViewItem[] theListViewItemArray;
				theSqlDataAdapter = new SqlDataAdapter (string.Concat ("SELECT distinct clrRexaminationStatus, clrRexaminationTimes FROM ClinicalRecord "
				+ "WHERE patISN= ", this._patISN, " and clrExaminationTimes = ", this.cbLanKham.Text), this.connStr);
				theDataSet = new DataSet ();
				int i3 = theSqlDataAdapter.Fill (theDataSet, "ReExamination");
				theSqlDataAdapter.Dispose ();
				if ((theDataSet.Tables["ReExamination"].Rows[0]["clrRexaminationStatus"].ToString () != string.Empty) && (theDataSet.Tables["ReExamination"].Rows.Count != 1))
				{
					goto L_00C5;
				}
				
			L_0098:
				
				{
				}
				this.txtTaiKham.Text = "0";
				this.txtTaiKham.Visible = true;
				this.cboTaiKham.Visible = false;
				goto L_017B;
				
			L_00C5:
				
				{
				}
				this.btTaiKham.Enabled = true;
				this.txtTaiKham.Visible = false;
				this.cboTaiKham.Visible = true;
				this.cboTaiKham.Items.Clear ();
				i = 0;
				goto L_013C;
				
			L_00FD:
				
				{
				}
				int i4 = this.cboTaiKham.Items.Add (theDataSet.Tables["ReExamination"].Rows[i]["clrRexaminationTimes"].ToString ());
				i++;
				
			L_013C:
				
				{
				}
				if (i < theDataSet.Tables["ReExamination"].Rows.Count)
				{
					goto L_00FD;
				}
				this.cboTaiKham.SelectedIndex = (this.cboTaiKham.Items.Count - 1);
				goto L_073F;
				
			L_017B:
				
				{
				}
				theSqlDataAdapter2 = new SqlDataAdapter (string.Concat ("SELECT patID, patName, patAge, patSex, patAddress, patTel, patOccupation, clrPul"
				+ "se, clrTemperature, clrBloodPressure, clrWeigh, clrMedicalHistory, clrTest, clrS"
				+ "ickNotInList, clrPathologicalSigns, clrExaminationTimes, clrSkill, clrDoctorPres"
				+ "cription, clrMedicalAdvice, DAY(patBirthDate) As NgaySinh, MONTH(patBirthDate) A"
				+ "s ThangSinh, YEAR(patBirthDate) As NamSinh, DAY(clrExaminationDate) As NgayKham,"
				+ " MONTH(clrExaminationDate) As ThangKham, YEAR(clrExaminationDate) As NamKham, DA"
				+ "Y(clrFollowUpExaminationDate) As NgayTaiKham, MONTH(clrFollowUpExaminationDate) "
				+ "As ThangTaiKham, YEAR(clrFollowUpExaminationDate) As NamTaiKham, empName, clrPic"
				+ "ture, clrISN, patMobile, clrSurgery, clrAppointmentDate, clrSickChange, clrSickH"
				+ "istory FROM vw_ClinicalRecord WHERE patISN=", this._patISN, " AND clrExaminationTimes=", this.cbLanKham.Text), this.connStr);
				theDataSet2 = new DataSet ();
				int i5 = theSqlDataAdapter2.Fill (theDataSet2, "vw_ClinicalRecord");
				if ((theDataSet2 != null) && ((theDataSet2.Tables.Count != 0) && (theDataSet2.Tables[0].Rows.Count != 0)))
				{
					goto L_01EC;
				}
				
			L_01E7:
				
				{
				}
				goto L_073F;
				
			L_01EC:
				
				{
				}
				theDataTable = theDataSet2.Tables["vw_ClinicalRecord"];
				this.tbID.Text = theDataTable.Rows[0]["patID"].ToString ();
				this.tbFullName.Text = theDataTable.Rows[0]["patName"].ToString ();
				this.tbTuoi.Text = theDataTable.Rows[0]["patAge"].ToString ();
				if (theDataTable.Rows[0]["patSex"].ToString () != "Nam")
				{
					goto L_02AA;
				}
				this.rbMale.Checked = true;
				goto L_02B6;
				
			L_02AA:
				
				{
				}
				this.rbFemale.Checked = true;
				
			L_02B6:
				
				{
				}
				this.tbAddress.Text = theDataTable.Rows[0]["patAddress"].ToString ();
				this.tbPhone.Text = theDataTable.Rows[0]["patTel"].ToString ();
				this.tbJob.Text = theDataTable.Rows[0]["patOccupation"].ToString ();
				if (theDataTable.Rows[0]["clrPulse"].ToString () != "0")
				{
					goto L_0365;
				}
				this.tbMach.Text = "";
				goto L_038C;
				
			L_0365:
				
				{
				}
				this.tbMach.Text = theDataTable.Rows[0]["clrPulse"].ToString ();
				
			L_038C:
				
				{
				}
				if (theDataTable.Rows[0]["clrTemperature"].ToString () != "0")
				{
					goto L_03C6;
				}
				this.tbNhietDo.Text = "";
				goto L_03ED;
				
			L_03C6:
				
				{
				}
				this.tbNhietDo.Text = theDataTable.Rows[0]["clrTemperature"].ToString ();
				
			L_03ED:
				
				{
				}
				if (theDataTable.Rows[0]["clrBloodPressure"].ToString () != "0")
				{
					goto L_0427;
				}
				this.tbHuyetAp.Text = "";
				goto L_044E;
				
			L_0427:
				
				{
				}
				this.tbHuyetAp.Text = theDataTable.Rows[0]["clrBloodPressure"].ToString ();
				
			L_044E:
				
				{
				}
				if (theDataTable.Rows[0]["clrWeigh"].ToString () != "0")
				{
					goto L_0488;
				}
				this.tbCanNang.Text = "";
				goto L_04AF;
				
			L_0488:
				
				{
				}
				this.tbCanNang.Text = theDataTable.Rows[0]["clrWeigh"].ToString ();
				
			L_04AF:
				
				{
				}
				this.tbBenhSu.Text = theDataTable.Rows[0]["clrMedicalHistory"].ToString ();
				this.tbBenhNgoaiDS.Text = theDataTable.Rows[0]["clrSickNotInList"].ToString ();
				theStringArray = new string[5];
				theStringArray[0] = theDataTable.Rows[0]["ThangSinh"].ToString ();
				theStringArray[1] = "/";
				theStringArray[2] = theDataTable.Rows[0]["NgaySinh"].ToString ();
				theStringArray[3] = "/";
				theStringArray[4] = theDataTable.Rows[0]["NamSinh"].ToString ();
				this.dtpBirthDay.Text = string.Concat (theStringArray);
				this.tbDiDong.Text = theDataTable.Rows[0]["patMobile"].ToString ();
				theSqlDataAdapter3 = new SqlDataAdapter (string.Concat ("SELECT * FROM vw_ClinicalSicks WHERE clrExaminationTimes=", this.cbLanKham.Text, " AND patISN=", this._patISN), this.connStr);
				theDataSet3 = new DataSet ();
				int i6 = theSqlDataAdapter3.Fill (theDataSet3, "vw_ClinicalSicks");
				if (theDataSet3 == null)
				{
					goto L_073F;
				}
				
			L_05FC:
				
				{
				}
				this.listView1.Items.Clear ();
				i2 = 0;
				goto L_071D;
				
			L_0614:
				
				{
				}
				theListViewItem = new ListViewItem (theDataSet3.Tables["vw_ClinicalSicks"].Rows[i2]["sckName"].ToString ());
				theString = theDataSet3.Tables["vw_ClinicalSicks"].Rows[i2]["sckSickLevel"].ToString ();
				if (theString != "0")
				{
					goto L_068F;
				}
				theListViewItem.ForeColor = Color.Red;
				
			L_068F:
				
				{
				}
				if (theString != "1")
				{
					goto L_06A9;
				}
				theListViewItem.ForeColor = Color.Blue;
				
			L_06A9:
				
				{
				}
				if (theString != "2")
				{
					goto L_06C3;
				}
				theListViewItem.ForeColor = Color.Purple;
				
			L_06C3:
				
				{
				}
				if (theString != "3")
				{
					goto L_06DD;
				}
				theListViewItem.ForeColor = Color.Green;
				
			L_06DD:
				
				{
				}
				if (theString != "4")
				{
					goto L_06F7;
				}
				theListViewItem.ForeColor = Color.Gray;
				
			L_06F7:
				
				{
				}
				theListViewItemArray = new ListViewItem[1];
				theListViewItemArray[0] = theListViewItem;
				this.listView1.Items.AddRange (theListViewItemArray);
				i2++;
				
			L_071D:
				
				{
				}
				if (i2 < theDataSet3.Tables["vw_ClinicalSicks"].Rows.Count)
				{
					goto L_0614;
				}
				
			L_073F:
				return;
			}
			
			private void cboTaiKham_SelectedIndexChanged (object sender, EventArgs e)
			
			{
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				DataTable theDataTable;
				SqlDataAdapter theSqlDataAdapter2;
				DataSet theDataSet2;
				int i;
				ListViewItem theListViewItem;
				string theString;
				string[] theStringArray;
				string[] theStringArray2;
				string[] theStringArray3;
				ListViewItem[] theListViewItemArray;
				theStringArray = new string[6];
				theStringArray[0] = "SELECT patID, patName, patAge, patSex, patAddress, patTel, patOccupation, clrPul"
				+ "se, clrTemperature, clrBloodPressure, clrWeigh, clrMedicalHistory, clrTest, clrS"
				+ "ickNotInList, clrPathologicalSigns, clrExaminationTimes, clrSkill, clrDoctorPres"
				+ "cription, clrMedicalAdvice, DAY(patBirthDate) As NgaySinh, MONTH(patBirthDate) A"
				+ "s ThangSinh, YEAR(patBirthDate) As NamSinh, DAY(clrExaminationDate) As NgayKham,"
				+ " MONTH(clrExaminationDate) As ThangKham, YEAR(clrExaminationDate) As NamKham, DA"
				+ "Y(clrFollowUpExaminationDate) As NgayTaiKham, MONTH(clrFollowUpExaminationDate) "
				+ "As ThangTaiKham, YEAR(clrFollowUpExaminationDate) As NamTaiKham, empName, clrPic"
				+ "ture, clrISN, patMobile, clrSurgery, clrAppointmentDate, clrSickChange, clrSickH"
				+ "istory FROM vw_ClinicalRecord WHERE patISN=";
				theStringArray[1] = this._patISN;
				theStringArray[2] = " AND clrExaminationTimes=";
				theStringArray[3] = this.cbLanKham.Text;
				theStringArray[4] = " and clrRexaminationTimes = ";
				theStringArray[5] = this.cboTaiKham.Text;
				theSqlDataAdapter = new SqlDataAdapter (string.Concat (theStringArray), this.connStr);
				theDataSet = new DataSet ();
				int i2 = theSqlDataAdapter.Fill (theDataSet, "vw_ClinicalRecord");
				if ((theDataSet != null) && ((theDataSet.Tables.Count != 0) && (theDataSet.Tables[0].Rows.Count != 0)))
				{
					goto L_009E;
				}
				
			L_0099:
				
				{
				}
				goto L_060A;
				
			L_009E:
				
				{
				}
				theDataTable = theDataSet.Tables["vw_ClinicalRecord"];
				this.tbID.Text = theDataTable.Rows[0]["patID"].ToString ();
				this.tbFullName.Text = theDataTable.Rows[0]["patName"].ToString ();
				this.tbTuoi.Text = theDataTable.Rows[0]["patAge"].ToString ();
				if (theDataTable.Rows[0]["patSex"].ToString () != "Nam")
				{
					goto L_0156;
				}
				this.rbMale.Checked = true;
				goto L_0162;
				
			L_0156:
				
				{
				}
				this.rbFemale.Checked = true;
				
			L_0162:
				
				{
				}
				this.tbAddress.Text = theDataTable.Rows[0]["patAddress"].ToString ();
				this.tbPhone.Text = theDataTable.Rows[0]["patTel"].ToString ();
				this.tbJob.Text = theDataTable.Rows[0]["patOccupation"].ToString ();
				if (theDataTable.Rows[0]["clrPulse"].ToString () != "0")
				{
					goto L_020D;
				}
				this.tbMach.Text = "";
				goto L_0233;
				
			L_020D:
				
				{
				}
				this.tbMach.Text = theDataTable.Rows[0]["clrPulse"].ToString ();
				
			L_0233:
				
				{
				}
				if (theDataTable.Rows[0]["clrTemperature"].ToString () != "0")
				{
					goto L_026C;
				}
				this.tbNhietDo.Text = "";
				goto L_0292;
				
			L_026C:
				
				{
				}
				this.tbNhietDo.Text = theDataTable.Rows[0]["clrTemperature"].ToString ();
				
			L_0292:
				
				{
				}
				if (theDataTable.Rows[0]["clrBloodPressure"].ToString () != "0")
				{
					goto L_02CB;
				}
				this.tbHuyetAp.Text = "";
				goto L_02F1;
				
			L_02CB:
				
				{
				}
				this.tbHuyetAp.Text = theDataTable.Rows[0]["clrBloodPressure"].ToString ();
				
			L_02F1:
				
				{
				}
				if (theDataTable.Rows[0]["clrWeigh"].ToString () != "0")
				{
					goto L_032A;
				}
				this.tbCanNang.Text = "";
				goto L_0350;
				
			L_032A:
				
				{
				}
				this.tbCanNang.Text = theDataTable.Rows[0]["clrWeigh"].ToString ();
				
			L_0350:
				
				{
				}
				this.tbBenhSu.Text = theDataTable.Rows[0]["clrMedicalHistory"].ToString ();
				this.tbBenhNgoaiDS.Text = theDataTable.Rows[0]["clrSickNotInList"].ToString ();
				theStringArray2 = new string[5];
				theStringArray2[0] = theDataTable.Rows[0]["ThangSinh"].ToString ();
				theStringArray2[1] = "/";
				theStringArray2[2] = theDataTable.Rows[0]["NgaySinh"].ToString ();
				theStringArray2[3] = "/";
				theStringArray2[4] = theDataTable.Rows[0]["NamSinh"].ToString ();
				this.dtpBirthDay.Text = string.Concat (theStringArray2);
				this.tbDiDong.Text = theDataTable.Rows[0]["patMobile"].ToString ();
				theStringArray3 = new string[6];
				theStringArray3[0] = "SELECT * FROM vw_ClinicalSicks WHERE clrExaminationTimes=";
				theStringArray3[1] = this.cbLanKham.Text;
				theStringArray3[2] = " AND patISN=";
				theStringArray3[3] = this._patISN;
				theStringArray3[4] = " and clrRexaminationTimes = ";
				theStringArray3[5] = this.cboTaiKham.Text;
				theSqlDataAdapter2 = new SqlDataAdapter (string.Concat (theStringArray3), this.connStr);
				theDataSet2 = new DataSet ();
				int i3 = theSqlDataAdapter2.Fill (theDataSet2, "vw_ClinicalSicks");
				if (theDataSet2 == null)
				{
					goto L_060A;
				}
				
			L_04C7:
				
				{
				}
				this.listView1.Items.Clear ();
				i = 0;
				goto L_05E8;
				
			L_04DF:
				
				{
				}
				theListViewItem = new ListViewItem (theDataSet2.Tables["vw_ClinicalSicks"].Rows[i]["sckName"].ToString ());
				theString = theDataSet2.Tables["vw_ClinicalSicks"].Rows[i]["sckSickLevel"].ToString ();
				if (theString != "0")
				{
					goto L_055A;
				}
				theListViewItem.ForeColor = Color.Red;
				
			L_055A:
				
				{
				}
				if (theString != "1")
				{
					goto L_0574;
				}
				theListViewItem.ForeColor = Color.Blue;
				
			L_0574:
				
				{
				}
				if (theString != "2")
				{
					goto L_058E;
				}
				theListViewItem.ForeColor = Color.Purple;
				
			L_058E:
				
				{
				}
				if (theString != "3")
				{
					goto L_05A8;
				}
				theListViewItem.ForeColor = Color.Green;
				
			L_05A8:
				
				{
				}
				if (theString != "4")
				{
					goto L_05C2;
				}
				theListViewItem.ForeColor = Color.Gray;
				
			L_05C2:
				
				{
				}
				theListViewItemArray = new ListViewItem[1];
				theListViewItemArray[0] = theListViewItem;
				this.listView1.Items.AddRange (theListViewItemArray);
				i++;
				
			L_05E8:
				
				{
				}
				if (i < theDataSet2.Tables["vw_ClinicalSicks"].Rows.Count)
				{
					goto L_04DF;
				}
				
			L_060A:
				return;
			}
			
			private bool CheckData ()
			
			{
				bool theBoolean;
				if (this.tbFullName.Text != "")
				{
					goto L_0031;
				}
				DialogResult theDialogResult = MessageBox.Show ("Vui l?ng nh?p h? v? t?n", "L?i Nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_00EB;
				
			L_0031:
				
				{
				}
				if (this.tbTuoi.Text == "")
				{
					goto L_0061;
				}
				if (Convert.ToInt64 (this.tbTuoi.Text.ToString ()) >= ((long) 0))
				{
					goto L_0078;
				}
				
			L_0061:
				
				{
				}
				DialogResult theDialogResult2 = MessageBox.Show ("Vui l?ng ch?n ng?y sinh h?p l?", "L?i Nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_00EB;
				
			L_0078:
				
				{
				}
				if (this.tbAddress.Text != "")
				{
					goto L_00A6;
				}
				DialogResult theDialogResult3 = MessageBox.Show ("Vui l?ng nh?p ??a ch?", "L?i Nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_00EB;
				
			L_00A6:
				
				{
				}
				if (this.listView1.Items.Count > 0)
				{
					goto L_00E7;
				}
				if (this.tbBenhNgoaiDS.Text != "")
				{
					goto L_00E7;
				}
				DialogResult theDialogResult4 = MessageBox.Show ("Vui l?ng ch?n tri?u ch?ng", "L?i Nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_00EB;
				
			L_00E7:
				
				{
				}
				theBoolean = true;
				goto L_00EB;
				
			L_00EB:
				
				{
				}
				return theBoolean;
			}
			
			protected override void Dispose (bool disposing)
			
			{
				if (! disposing)
				{
					goto L_0016;
				}
				if (this.components == null)
				{
					goto L_0016;
				}
				this.components.Dispose ();
				
			L_0016:
				
				{
				}
				base.Dispose (disposing);
				return;
			}
			
			private void frmYTaLapMoi_Load (object sender, EventArgs e)
			
			{
				SqlConnection theSqlConnection;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				DataTable theDataTable;
				SqlDataAdapter theSqlDataAdapter2;
				DataSet theDataSet2;
				DataTable theDataTable2;
				string[] theStringArray;
				this.LoadCayBenh ();
				theSqlConnection = new SqlConnection (this.connStr);
				if (this._NhanBiet != "0")
				{
					goto L_03EB;
				}
				theSqlDataAdapter = new SqlDataAdapter (string.Concat ("SELECT patID, patName, DAY(patBirthDate) AS NgaySinh, MONTH(patBirthDate) As Tha"
				+ "ngSinh, YEAR(patBirthDate) As NamSinh, clrPulse, clrTemperature, clrBloodPressur"
				+ "e, clrWeigh, patSex, patAddress, patAge, patTel, patOccupation, clrExaminationTi"
				+ "mes, patMobile, clrSurgery FROM vw_SearchClinicalRecord WHERE patISN=", this._patISN), theSqlConnection);
				theDataSet = new DataSet ();
				int i = theSqlDataAdapter.Fill (theDataSet, "Patients");
				theDataTable = theDataSet.Tables["Patients"];
				this.tbID.Text = theDataTable.Rows[0]["patID"].ToString ();
				this.tbFullName.Text = theDataTable.Rows[0]["patName"].ToString ();
				theStringArray = new string[5];
				theStringArray[0] = theDataTable.Rows[0]["ThangSinh"].ToString ();
				theStringArray[1] = "/";
				theStringArray[2] = theDataTable.Rows[0]["NgaySinh"].ToString ();
				theStringArray[3] = "/";
				theStringArray[4] = theDataTable.Rows[0]["NamSinh"].ToString ();
				this.dtpBirthDay.Text = string.Concat (theStringArray);
				if (theDataTable.Rows[0]["clrPulse"].ToString () != "0")
				{
					goto L_0170;
				}
				this.tbMach.Text = "";
				goto L_0196;
				
			L_0170:
				
				{
				}
				this.tbMach.Text = theDataTable.Rows[0]["clrPulse"].ToString ();
				
			L_0196:
				
				{
				}
				if (theDataTable.Rows[0]["clrTemperature"].ToString () != "0")
				{
					goto L_01CF;
				}
				this.tbNhietDo.Text = "";
				goto L_01F5;
				
			L_01CF:
				
				{
				}
				this.tbNhietDo.Text = theDataTable.Rows[0]["clrTemperature"].ToString ();
				
			L_01F5:
				
				{
				}
				if (theDataTable.Rows[0]["clrBloodPressure"].ToString () != "0")
				{
					goto L_022E;
				}
				this.tbHuyetAp.Text = "";
				goto L_0254;
				
			L_022E:
				
				{
				}
				this.tbHuyetAp.Text = theDataTable.Rows[0]["clrBloodPressure"].ToString ();
				
			L_0254:
				
				{
				}
				if (theDataTable.Rows[0]["clrWeigh"].ToString () != "0")
				{
					goto L_028D;
				}
				this.tbCanNang.Text = "";
				goto L_02B3;
				
			L_028D:
				
				{
				}
				this.tbCanNang.Text = theDataTable.Rows[0]["clrWeigh"].ToString ();
				
			L_02B3:
				
				{
				}
				if (theDataTable.Rows[0]["patSex"].ToString () != "Nam")
				{
					goto L_02E8;
				}
				this.rbMale.Checked = true;
				goto L_02F4;
				
			L_02E8:
				
				{
				}
				this.rbFemale.Checked = true;
				
			L_02F4:
				
				{
				}
				this.tbAddress.Text = theDataTable.Rows[0]["patAddress"].ToString ();
				this.tbTuoi.Text = theDataTable.Rows[0]["patAge"].ToString ();
				this.tbPhone.Text = theDataTable.Rows[0]["patTel"].ToString ();
				this.tbJob.Text = theDataTable.Rows[0]["patOccupation"].ToString ();
				this.tbDiDong.Text = theDataTable.Rows[0]["patMobile"].ToString ();
				this.tbLanKham.Text = "1";
				this.tbLanKham.Visible = true;
				this.cbLanKham.Visible = false;
				this.btLuuBenhAn.Enabled = true;
				goto L_052E;
				
			L_03EB:
				
				{
				}
				this.tbLanKham.Text = "1";
				this.tbLanKham.Visible = false;
				this.cbLanKham.Visible = true;
				this.btReset.Visible = true;
				this.btLuuBenhAn.Enabled = false;
				theSqlDataAdapter2 = new SqlDataAdapter (string.Concat ("SELECT distinct clrExaminationTimes FROM ClinicalRecord WHERE patISN=", this._patISN), theSqlConnection);
				theDataSet2 = new DataSet ();
				int i2 = theSqlDataAdapter2.Fill (theDataSet2, "ClinicalRecord");
				theDataTable2 = theDataSet2.Tables["ClinicalRecord"];
				if ((theDataTable2.Rows[0]["clrExaminationTimes"].ToString () != string.Empty) && (theDataTable2.Rows[0]["clrExaminationTimes"].ToString () != ""))
				{
					goto L_04E6;
				}
				
			L_04BC:
				
				{
				}
				this.tbLanKham.Text = "1";
				this.tbLanKham.Visible = true;
				this.cbLanKham.Visible = false;
				goto L_0520;
				
			L_04E6:
				
				{
				}
				this.cbLanKham.DisplayMember = "ClinicalRecord.clrExaminationTimes";
				this.cbLanKham.DataSource = theDataSet2;
				this.cbLanKham.SelectedIndex = (this.cbLanKham.Items.Count - 1);
				
			L_0520:
				
				{
				}
				this.cbLanKham_SelectedIndexChanged (null, ((EventArgs) null));
				theSqlConnection.Close ();
				
			L_052E:
				return;
			}
			
			private void InitializeComponent ()
			
			{
				ResourceManager theResourceManager;
				Control[] theControlArray;
				Control[] theControlArray2;
				Control[] theControlArray3;
				Control[] theControlArray4;
				Control[] theControlArray5;
				this.components = ((IContainer) new System.ComponentModel.Container ());
				theResourceManager = new ResourceManager (typeof (frmYTaLapMoi));
				this.groupBox3 = new GroupBox ();
				this.tbBenhSu = new TextBox ();
				this.label13 = new Label ();
				this.tbBenhNgoaiDS = new TextBox ();
				this.label15 = new Label ();
				this.groupBox4 = new GroupBox ();
				this.btTaiKham = new Button ();
				this.btReset = new Button ();
				this.btLuuBenhAn = new Button ();
				this.btThoat = new Button ();
				this.groupBox2 = new GroupBox ();
				this.label17 = new Label ();
				this.cbLanKham = new ComboBox ();
				this.label14 = new Label ();
				this.label16 = new Label ();
				this.btRemove = new Button ();
				this.btAdd = new Button ();
				this.treeView1 = new TreeView ();
				this.tbCanNang = new TextBox ();
				this.tbHuyetAp = new TextBox ();
				this.label12 = new Label ();
				this.label11 = new Label ();
				this.tbNhietDo = new TextBox ();
				this.tbMach = new TextBox ();
				this.label10 = new Label ();
				this.label9 = new Label ();
				this.listView1 = new ListView ();
				this.tbLanKham = new TextBox ();
				this.cboTaiKham = new ComboBox ();
				this.txtTaiKham = new TextBox ();
				this.toolTip1 = new ToolTip (this.components);
				this.groupBox1 = new GroupBox ();
				this.tbDiDong = new TextBox ();
				this.dtpBirthDay = new DateTimePicker ();
				this.rbMale = new RadioButton ();
				this.tbJob = new TextBox ();
				this.tbPhone = new TextBox ();
				this.tbAddress = new TextBox ();
				this.tbTuoi = new TextBox ();
				this.tbID = new TextBox ();
				this.tbFullName = new TextBox ();
				this.label7 = new Label ();
				this.label6 = new Label ();
				this.label5 = new Label ();
				this.label4 = new Label ();
				this.label3 = new Label ();
				this.label2 = new Label ();
				this.label1 = new Label ();
				this.label8 = new Label ();
				this.rbFemale = new RadioButton ();
				this.label21 = new Label ();
				this.label19 = new Label ();
				this.groupBox3.SuspendLayout ();
				this.groupBox4.SuspendLayout ();
				this.groupBox2.SuspendLayout ();
				this.groupBox1.SuspendLayout ();
				base.SuspendLayout ();
				theControlArray = new Control[4];
				theControlArray[0] = ((Control) this.tbBenhSu);
				theControlArray[1] = ((Control) this.label13);
				theControlArray[2] = ((Control) this.tbBenhNgoaiDS);
				theControlArray[3] = ((Control) this.label15);
				this.groupBox3.Controls.AddRange (theControlArray);
				this.groupBox3.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.groupBox3.ForeColor = SystemColors.ControlText;
				this.groupBox3.Location = new Point (8, 256);
				this.groupBox3.Name = "groupBox3";
				this.groupBox3.Size = new System.Drawing.Size (344, 136);
				this.groupBox3.TabIndex = 1;
				this.groupBox3.TabStop = false;
				this.tbBenhSu.AutoSize = false;
				this.tbBenhSu.BorderStyle = BorderStyle.FixedSingle;
				this.tbBenhSu.Location = new Point (112, 15);
				this.tbBenhSu.MaxLength = 300;
				this.tbBenhSu.Multiline = true;
				this.tbBenhSu.Name = "tbBenhSu";
				this.tbBenhSu.ScrollBars = ScrollBars.Both;
				this.tbBenhSu.Size = new System.Drawing.Size (216, 48);
				this.tbBenhSu.TabIndex = 9;
				this.tbBenhSu.Text = "";
				this.label13.Location = new Point (16, 24);
				this.label13.Name = "label13";
				this.label13.TabIndex = 0;
				this.label13.Text = "Ti?n c?n:";
				this.tbBenhNgoaiDS.AutoSize = false;
				this.tbBenhNgoaiDS.BorderStyle = BorderStyle.FixedSingle;
				this.tbBenhNgoaiDS.Location = new Point (112, 72);
				this.tbBenhNgoaiDS.MaxLength = 300;
				this.tbBenhNgoaiDS.Multiline = true;
				this.tbBenhNgoaiDS.Name = "tbBenhNgoaiDS";
				this.tbBenhNgoaiDS.ScrollBars = ScrollBars.Both;
				this.tbBenhNgoaiDS.Size = new System.Drawing.Size (216, 56);
				this.tbBenhNgoaiDS.TabIndex = 11;
				this.tbBenhNgoaiDS.Text = "";
				this.label15.Location = new Point (16, 80);
				this.label15.Name = "label15";
				this.label15.Size = new System.Drawing.Size (112, 36);
				this.label15.TabIndex = 4;
				this.label15.Text = "Tri?u ch?ng ngo?i DS:";
				theControlArray2 = new Control[4];
				theControlArray2[0] = ((Control) this.btTaiKham);
				theControlArray2[1] = ((Control) this.btReset);
				theControlArray2[2] = ((Control) this.btLuuBenhAn);
				theControlArray2[3] = ((Control) this.btThoat);
				this.groupBox4.Controls.AddRange (theControlArray2);
				this.groupBox4.Location = new Point (256, 392);
				this.groupBox4.Name = "groupBox4";
				this.groupBox4.Size = new System.Drawing.Size (448, 48);
				this.groupBox4.TabIndex = 3;
				this.groupBox4.TabStop = false;
				this.btTaiKham.FlatStyle = FlatStyle.Popup;
				this.btTaiKham.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.btTaiKham.Location = new Point (144, 16);
				this.btTaiKham.Name = "btTaiKham";
				this.btTaiKham.Size = new System.Drawing.Size (96, 23);
				this.btTaiKham.TabIndex = 1;
				this.btTaiKham.Text = "T?i Kh?m";
				this.btTaiKham.Click += new EventHandler (this.btTaiKham_Click);
				this.btReset.FlatStyle = FlatStyle.Popup;
				this.btReset.Location = new Point (8, 16);
				this.btReset.Name = "btReset";
				this.btReset.Size = new System.Drawing.Size (128, 23);
				this.btReset.TabIndex = 0;
				this.btReset.Text = "L?p B?nh ?n M?i";
				this.btReset.Click += new EventHandler (this.btReset_Click);
				this.btLuuBenhAn.FlatStyle = FlatStyle.Popup;
				this.btLuuBenhAn.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.btLuuBenhAn.Location = new Point (248, 16);
				this.btLuuBenhAn.Name = "btLuuBenhAn";
				this.btLuuBenhAn.Size = new System.Drawing.Size (96, 23);
				this.btLuuBenhAn.TabIndex = 2;
				this.btLuuBenhAn.Text = "L?u B?nh ?n";
				this.btLuuBenhAn.Click += new EventHandler (this.btLuuBenhAn_Click);
				this.btThoat.FlatStyle = FlatStyle.Popup;
				this.btThoat.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.btThoat.Location = new Point (352, 16);
				this.btThoat.Name = "btThoat";
				this.btThoat.Size = new System.Drawing.Size (88, 23);
				this.btThoat.TabIndex = 3;
				this.btThoat.Text = "Tho?t";
				this.btThoat.Click += new EventHandler (this.btThoat_Click);
				theControlArray3 = new Control[19];
				theControlArray3[0] = ((Control) this.label17);
				theControlArray3[1] = ((Control) this.cbLanKham);
				theControlArray3[2] = ((Control) this.label14);
				theControlArray3[3] = ((Control) this.label16);
				theControlArray3[4] = ((Control) this.btRemove);
				theControlArray3[5] = ((Control) this.btAdd);
				theControlArray3[6] = ((Control) this.treeView1);
				theControlArray3[7] = ((Control) this.tbCanNang);
				theControlArray3[8] = ((Control) this.tbHuyetAp);
				theControlArray3[9] = ((Control) this.label12);
				theControlArray3[10] = ((Control) this.label11);
				theControlArray3[11] = ((Control) this.tbNhietDo);
				theControlArray3[12] = ((Control) this.tbMach);
				theControlArray3[13] = ((Control) this.label10);
				theControlArray3[14] = ((Control) this.label9);
				theControlArray3[15] = ((Control) this.listView1);
				theControlArray3[16] = ((Control) this.tbLanKham);
				theControlArray3[17] = ((Control) this.cboTaiKham);
				theControlArray3[18] = ((Control) this.txtTaiKham);
				this.groupBox2.Controls.AddRange (theControlArray3);
				this.groupBox2.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Bold, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.groupBox2.ForeColor = Color.Coral;
				this.groupBox2.Location = new Point (360, 44);
				this.groupBox2.Name = "groupBox2";
				this.groupBox2.Size = new System.Drawing.Size (344, 348);
				this.groupBox2.TabIndex = 2;
				this.groupBox2.TabStop = false;
				this.groupBox2.Text = "B?nh ?n";
				this.label17.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label17.ForeColor = SystemColors.ControlText;
				this.label17.Location = new Point (177, 313);
				this.label17.Name = "label17";
				this.label17.Size = new System.Drawing.Size (96, 23);
				this.label17.TabIndex = 23;
				this.label17.Text = "L?n T?i Kh?m:";
				this.cbLanKham.DropDownStyle = ComboBoxStyle.DropDownList;
				this.cbLanKham.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.cbLanKham.Location = new Point (96, 312);
				this.cbLanKham.Name = "cbLanKham";
				this.cbLanKham.Size = new System.Drawing.Size (48, 22);
				this.cbLanKham.TabIndex = 21;
				this.cbLanKham.SelectedIndexChanged += new EventHandler (this.cbLanKham_SelectedIndexChanged);
				this.label14.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label14.ForeColor = SystemColors.ControlText;
				this.label14.Location = new Point (16, 313);
				this.label14.Name = "label14";
				this.label14.Size = new System.Drawing.Size (72, 23);
				this.label14.TabIndex = 20;
				this.label14.Text = "L?n kh?m:";
				this.label16.Font = new System.Drawing.Font ("Verdana", 9F, (FontStyle.Bold | FontStyle.Underline), GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label16.ForeColor = Color.MediumBlue;
				this.label16.Location = new Point (16, 72);
				this.label16.Name = "label16";
				this.label16.Size = new System.Drawing.Size (96, 23);
				this.label16.TabIndex = 18;
				this.label16.Text = "Tri?u ch?ng:";
				this.btRemove.FlatStyle = FlatStyle.Popup;
				this.btRemove.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Bold, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.btRemove.ForeColor = SystemColors.ControlText;
				this.btRemove.Image = ((Image) ((Bitmap) theResourceManager.GetObject ("btRemove.Image")));
				this.btRemove.Location = new Point (160, 160);
				this.btRemove.Name = "btRemove";
				this.btRemove.Size = new System.Drawing.Size (32, 23);
				this.btRemove.TabIndex = 18;
				this.btRemove.Click += new EventHandler (this.btRemove_Click);
				this.btAdd.FlatStyle = FlatStyle.Popup;
				this.btAdd.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Bold, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.btAdd.ForeColor = SystemColors.ControlText;
				this.btAdd.Image = ((Image) ((Bitmap) theResourceManager.GetObject ("btAdd.Image")));
				this.btAdd.Location = new Point (160, 136);
				this.btAdd.Name = "btAdd";
				this.btAdd.Size = new System.Drawing.Size (32, 23);
				this.btAdd.TabIndex = 17;
				this.btAdd.Click += new EventHandler (this.btAdd_Click);
				this.treeView1.BorderStyle = BorderStyle.FixedSingle;
				this.treeView1.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.treeView1.ImageIndex = -1;
				this.treeView1.ItemHeight = 16;
				this.treeView1.Location = new Point (16, 96);
				this.treeView1.Name = "treeView1";
				this.treeView1.SelectedImageIndex = -1;
				this.treeView1.Size = new System.Drawing.Size (136, 200);
				this.treeView1.TabIndex = 16;
				this.treeView1.DoubleClick += new EventHandler (this.treeView1_DoubleClick);
				this.tbCanNang.BorderStyle = BorderStyle.FixedSingle;
				this.tbCanNang.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbCanNang.Location = new Point (256, 48);
				this.tbCanNang.Name = "tbCanNang";
				this.tbCanNang.Size = new System.Drawing.Size (72, 22);
				this.tbCanNang.TabIndex = 15;
				this.tbCanNang.Text = "";
				this.tbHuyetAp.BorderStyle = BorderStyle.FixedSingle;
				this.tbHuyetAp.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbHuyetAp.Location = new Point (256, 24);
				this.tbHuyetAp.Name = "tbHuyetAp";
				this.tbHuyetAp.Size = new System.Drawing.Size (72, 22);
				this.tbHuyetAp.TabIndex = 14;
				this.tbHuyetAp.Text = "";
				this.label12.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label12.ForeColor = SystemColors.ControlText;
				this.label12.Location = new Point (184, 48);
				this.label12.Name = "label12";
				this.label12.Size = new System.Drawing.Size (104, 23);
				this.label12.TabIndex = 16;
				this.label12.Text = "C?n n?ng:";
				this.label11.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label11.ForeColor = SystemColors.ControlText;
				this.label11.Location = new Point (184, 24);
				this.label11.Name = "label11";
				this.label11.Size = new System.Drawing.Size (80, 23);
				this.label11.TabIndex = 15;
				this.label11.Text = "Huy?t ?p:";
				this.tbNhietDo.BorderStyle = BorderStyle.FixedSingle;
				this.tbNhietDo.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbNhietDo.Location = new Point (96, 48);
				this.tbNhietDo.Name = "tbNhietDo";
				this.tbNhietDo.Size = new System.Drawing.Size (72, 22);
				this.tbNhietDo.TabIndex = 13;
				this.tbNhietDo.Text = "";
				this.tbMach.BorderStyle = BorderStyle.FixedSingle;
				this.tbMach.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbMach.Location = new Point (96, 24);
				this.tbMach.Name = "tbMach";
				this.tbMach.Size = new System.Drawing.Size (72, 22);
				this.tbMach.TabIndex = 12;
				this.tbMach.Text = "";
				this.label10.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label10.ForeColor = SystemColors.ControlText;
				this.label10.Location = new Point (16, 48);
				this.label10.Name = "label10";
				this.label10.Size = new System.Drawing.Size (72, 23);
				this.label10.TabIndex = 1;
				this.label10.Text = "Nhi?t ??:";
				this.label9.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label9.ForeColor = SystemColors.ControlText;
				this.label9.Location = new Point (16, 24);
				this.label9.Name = "label9";
				this.label9.Size = new System.Drawing.Size (48, 23);
				this.label9.TabIndex = 0;
				this.label9.Text = "M?ch:";
				this.listView1.AllowColumnReorder = true;
				this.listView1.BorderStyle = BorderStyle.FixedSingle;
				this.listView1.FullRowSelect = true;
				this.listView1.Location = new Point (200, 96);
				this.listView1.MultiSelect = false;
				this.listView1.Name = "listView1";
				this.listView1.Size = new System.Drawing.Size (128, 200);
				this.listView1.TabIndex = 19;
				this.listView1.View = View.List;
				this.listView1.MouseDown += new MouseEventHandler (this.listView1_MouseDown);
				this.listView1.DoubleClick += new EventHandler (this.listView1_DoubleClick);
				this.listView1.SelectedIndexChanged += new EventHandler (this.listView1_SelectedIndexChanged);
				this.tbLanKham.BorderStyle = BorderStyle.FixedSingle;
				this.tbLanKham.Enabled = false;
				this.tbLanKham.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbLanKham.Location = new Point (96, 312);
				this.tbLanKham.Name = "tbLanKham";
				this.tbLanKham.Size = new System.Drawing.Size (48, 22);
				this.tbLanKham.TabIndex = 22;
				this.tbLanKham.Text = "";
				this.cboTaiKham.DropDownStyle = ComboBoxStyle.DropDownList;
				this.cboTaiKham.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.cboTaiKham.Location = new Point (281, 311);
				this.cboTaiKham.Name = "cboTaiKham";
				this.cboTaiKham.Size = new System.Drawing.Size (48, 22);
				this.cboTaiKham.TabIndex = 24;
				this.cboTaiKham.SelectedIndexChanged += new EventHandler (this.cboTaiKham_SelectedIndexChanged);
				this.txtTaiKham.BorderStyle = BorderStyle.FixedSingle;
				this.txtTaiKham.Enabled = false;
				this.txtTaiKham.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.txtTaiKham.Location = new Point (281, 311);
				this.txtTaiKham.Name = "txtTaiKham";
				this.txtTaiKham.Size = new System.Drawing.Size (48, 22);
				this.txtTaiKham.TabIndex = 25;
				this.txtTaiKham.Text = "";
				this.toolTip1.AutoPopDelay = 5000;
				this.toolTip1.InitialDelay = 100;
				this.toolTip1.ReshowDelay = 100;
				theControlArray4 = new Control[19];
				theControlArray4[0] = ((Control) this.tbDiDong);
				theControlArray4[1] = ((Control) this.dtpBirthDay);
				theControlArray4[2] = ((Control) this.rbMale);
				theControlArray4[3] = ((Control) this.tbJob);
				theControlArray4[4] = ((Control) this.tbPhone);
				theControlArray4[5] = ((Control) this.tbAddress);
				theControlArray4[6] = ((Control) this.tbTuoi);
				theControlArray4[7] = ((Control) this.tbID);
				theControlArray4[8] = ((Control) this.tbFullName);
				theControlArray4[9] = ((Control) this.label7);
				theControlArray4[10] = ((Control) this.label6);
				theControlArray4[11] = ((Control) this.label5);
				theControlArray4[12] = ((Control) this.label4);
				theControlArray4[13] = ((Control) this.label3);
				theControlArray4[14] = ((Control) this.label2);
				theControlArray4[15] = ((Control) this.label1);
				theControlArray4[16] = ((Control) this.label8);
				theControlArray4[17] = ((Control) this.rbFemale);
				theControlArray4[18] = ((Control) this.label21);
				this.groupBox1.Controls.AddRange (theControlArray4);
				this.groupBox1.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Bold, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.groupBox1.ForeColor = Color.Coral;
				this.groupBox1.Location = new Point (7, 44);
				this.groupBox1.Name = "groupBox1";
				this.groupBox1.Size = new System.Drawing.Size (344, 211);
				this.groupBox1.TabIndex = 0;
				this.groupBox1.TabStop = false;
				this.groupBox1.Text = "Th?ng Tin C? Nh?n";
				this.tbDiDong.BorderStyle = BorderStyle.FixedSingle;
				this.tbDiDong.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbDiDong.Location = new Point (238, 152);
				this.tbDiDong.MaxLength = 10;
				this.tbDiDong.Name = "tbDiDong";
				this.tbDiDong.Size = new System.Drawing.Size (90, 22);
				this.tbDiDong.TabIndex = 7;
				this.tbDiDong.Text = "";
				this.dtpBirthDay.CustomFormat = "dd/MM/yyyy";
				this.dtpBirthDay.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.dtpBirthDay.Format = DateTimePickerFormat.Custom;
				this.dtpBirthDay.Location = new Point (110, 80);
				this.dtpBirthDay.Name = "dtpBirthDay";
				this.dtpBirthDay.Size = new System.Drawing.Size (104, 22);
				this.dtpBirthDay.TabIndex = 1;
				this.rbMale.Checked = true;
				this.rbMale.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.rbMale.ForeColor = SystemColors.ControlText;
				this.rbMale.Location = new Point (222, 102);
				this.rbMale.Name = "rbMale";
				this.rbMale.Size = new System.Drawing.Size (56, 24);
				this.rbMale.TabIndex = 3;
				this.rbMale.TabStop = true;
				this.rbMale.Text = "Nam";
				this.tbJob.BorderStyle = BorderStyle.FixedSingle;
				this.tbJob.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbJob.Location = new Point (110, 176);
				this.tbJob.MaxLength = 200;
				this.tbJob.Name = "tbJob";
				this.tbJob.Size = new System.Drawing.Size (218, 22);
				this.tbJob.TabIndex = 8;
				this.tbJob.Text = "";
				this.tbPhone.BorderStyle = BorderStyle.FixedSingle;
				this.tbPhone.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbPhone.Location = new Point (110, 152);
				this.tbPhone.MaxLength = 10;
				this.tbPhone.Name = "tbPhone";
				this.tbPhone.Size = new System.Drawing.Size (88, 22);
				this.tbPhone.TabIndex = 6;
				this.tbPhone.Text = "";
				this.tbAddress.BorderStyle = BorderStyle.FixedSingle;
				this.tbAddress.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbAddress.Location = new Point (110, 128);
				this.tbAddress.Name = "tbAddress";
				this.tbAddress.Size = new System.Drawing.Size (218, 22);
				this.tbAddress.TabIndex = 5;
				this.tbAddress.Text = "";
				this.tbTuoi.BorderStyle = BorderStyle.FixedSingle;
				this.tbTuoi.Enabled = false;
				this.tbTuoi.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbTuoi.Location = new Point (110, 104);
				this.tbTuoi.Name = "tbTuoi";
				this.tbTuoi.Size = new System.Drawing.Size (40, 22);
				this.tbTuoi.TabIndex = 2;
				this.tbTuoi.Text = "";
				this.tbID.BorderStyle = BorderStyle.FixedSingle;
				this.tbID.Enabled = false;
				this.tbID.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbID.Location = new Point (110, 32);
				this.tbID.Name = "tbID";
				this.tbID.Size = new System.Drawing.Size (104, 22);
				this.tbID.TabIndex = 811;
				this.tbID.Text = "";
				this.tbFullName.BorderStyle = BorderStyle.FixedSingle;
				this.tbFullName.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbFullName.Location = new Point (110, 56);
				this.tbFullName.Name = "tbFullName";
				this.tbFullName.Size = new System.Drawing.Size (216, 22);
				this.tbFullName.TabIndex = 0;
				this.tbFullName.Text = "";
				this.label7.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label7.ForeColor = SystemColors.ControlText;
				this.label7.Location = new Point (16, 176);
				this.label7.Name = "label7";
				this.label7.Size = new System.Drawing.Size (96, 23);
				this.label7.TabIndex = 6;
				this.label7.Text = "Ngh? nghi?p:";
				this.label6.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label6.ForeColor = SystemColors.ControlText;
				this.label6.Location = new Point (16, 152);
				this.label6.Name = "label6";
				this.label6.Size = new System.Drawing.Size (80, 23);
				this.label6.TabIndex = 5;
				this.label6.Text = "?i?n tho?i:";
				this.label5.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label5.ForeColor = SystemColors.ControlText;
				this.label5.Location = new Point (16, 128);
				this.label5.Name = "label5";
				this.label5.Size = new System.Drawing.Size (64, 23);
				this.label5.TabIndex = 4;
				this.label5.Text = "??a ch?:";
				this.label4.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label4.ForeColor = SystemColors.ControlText;
				this.label4.Location = new Point (16, 104);
				this.label4.Name = "label4";
				this.label4.Size = new System.Drawing.Size (48, 23);
				this.label4.TabIndex = 3;
				this.label4.Text = "Tu?i:";
				this.label3.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label3.ForeColor = SystemColors.ControlText;
				this.label3.Location = new Point (16, 80);
				this.label3.Name = "label3";
				this.label3.Size = new System.Drawing.Size (80, 23);
				this.label3.TabIndex = 2;
				this.label3.Text = "Ng?y sinh:";
				this.label2.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label2.ForeColor = SystemColors.ControlText;
				this.label2.Location = new Point (16, 56);
				this.label2.Name = "label2";
				this.label2.Size = new System.Drawing.Size (80, 23);
				this.label2.TabIndex = 1;
				this.label2.Text = "H? v? T?n:";
				this.label1.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label1.ForeColor = SystemColors.ControlText;
				this.label1.Location = new Point (16, 32);
				this.label1.Name = "label1";
				this.label1.Size = new System.Drawing.Size (56, 23);
				this.label1.TabIndex = 0;
				this.label1.Text = "S? ID:";
				this.label8.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label8.ForeColor = SystemColors.ControlText;
				this.label8.Location = new Point (166, 105);
				this.label8.Name = "label8";
				this.label8.TabIndex = 15;
				this.label8.Text = "Ph?i:";
				this.rbFemale.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.rbFemale.ForeColor = SystemColors.ControlText;
				this.rbFemale.Location = new Point (286, 101);
				this.rbFemale.Name = "rbFemale";
				this.rbFemale.Size = new System.Drawing.Size (48, 24);
				this.rbFemale.TabIndex = 4;
				this.rbFemale.Text = "N?";
				this.label21.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label21.ForeColor = SystemColors.ControlText;
				this.label21.Location = new Point (206, 155);
				this.label21.Name = "label21";
				this.label21.TabIndex = 812;
				this.label21.Text = "D?:";
				this.label19.Font = new System.Drawing.Font ("Verdana", 12F, FontStyle.Bold, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label19.ForeColor = Color.MediumBlue;
				this.label19.Location = new Point (288, 12);
				this.label19.Name = "label19";
				this.label19.Size = new System.Drawing.Size (144, 23);
				this.label19.TabIndex = 2571;
				this.label19.Text = "H? S? B?nh ?n";
				this.AutoScaleBaseSize = new System.Drawing.Size (7, 16);
				base.ClientSize = new System.Drawing.Size (710, 451);
				theControlArray5 = new Control[5];
				theControlArray5[0] = ((Control) this.groupBox4);
				theControlArray5[1] = ((Control) this.groupBox2);
				theControlArray5[2] = ((Control) this.groupBox1);
				theControlArray5[3] = ((Control) this.label19);
				theControlArray5[4] = ((Control) this.groupBox3);
				base.Controls.AddRange (theControlArray5);
				this.Font = new System.Drawing.Font ("Verdana", 9.75F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
				base.Icon = ((System.Drawing.Icon) theResourceManager.GetObject ("$this.Icon"));
				base.MaximizeBox = false;
				base.MinimizeBox = false;
				base.Name = "frmYTaLapMoi";
				base.StartPosition = FormStartPosition.CenterScreen;
				this.Text = "H? S? B?nh ?n C";
				base.Load += new EventHandler (this.frmYTaLapMoi_Load);
				this.groupBox3.ResumeLayout (false);
				this.groupBox4.ResumeLayout (false);
				this.groupBox2.ResumeLayout (false);
				this.groupBox1.ResumeLayout (false);
				base.ResumeLayout (false);
				return;
			}
			
			private void insertChildNode (string strName)
			
			{
				TreeNode theTreeNode = this.node.Nodes.Add (strName);
				return;
			}
			
			private void insertParentNode (string strName)
			
			{
				this.node = new TreeNode (strName);
				return;
			}
			
			private bool IsFloat (string Number)
			
			{
				bool theBoolean;
				
			L_0000:
				try
				{
					float theSingle = float.Parse (Number);
					theBoolean = true;
				}
				catch
				{
					
				L_000B:
					
					{
					}
					theBoolean = false;
				}
				
			L_0010:
				
				{
				}
				return theBoolean;
			}
			
			private bool IsNumber (string Number)
			
			{
				bool theBoolean;
				
			L_0000:
				try
				{
					long theLong = long.Parse (Number);
					theBoolean = true;
				}
				catch
				{
					
				L_000B:
					
					{
					}
					theBoolean = false;
				}
				
			L_0010:
				
				{
				}
				return theBoolean;
			}
			
			private void listView1_DoubleClick (object sender, EventArgs e)
			
			{
				ListViewItem theListViewItem;
				if (this.listView1.SelectedItems.Count <= 0)
				{
					goto L_0036;
				}
				theListViewItem = this.listView1.SelectedItems[0];
				this.listView1.Items.Remove (theListViewItem);
				
			L_0036:
				return;
			}
			
			private void listView1_MouseDown (object sender, MouseEventArgs e)
			
			{
				frmBangMau theFrmBangMau;
				ListViewItem theListViewItem;
				ListViewItem theListViewItem2;
				ListViewItem[] theListViewItemArray;
				if (e.Button != MouseButtons.Right)
				{
					goto L_0116;
				}
				theFrmBangMau = new frmBangMau ();
				theFrmBangMau.ShowInTaskbar = false;
				DialogResult theDialogResult = theFrmBangMau.ShowDialog ();
				if (this.listView1.SelectedItems.Count <= 0)
				{
					goto L_0116;
				}
				theListViewItem = this.listView1.SelectedItems[0];
				theListViewItem2 = new ListViewItem (theListViewItem.Text.ToString ());
				if (Class.mau != "Red")
				{
					goto L_0079;
				}
				theListViewItem2.ForeColor = Color.Red;
				
			L_0079:
				
				{
				}
				if (Class.mau != "Green")
				{
					goto L_0095;
				}
				theListViewItem2.ForeColor = Color.Green;
				
			L_0095:
				
				{
				}
				if (Class.mau != "Purple")
				{
					goto L_00B1;
				}
				theListViewItem2.ForeColor = Color.Purple;
				
			L_00B1:
				
				{
				}
				if (Class.mau != "Blue")
				{
					goto L_00CD;
				}
				theListViewItem2.ForeColor = Color.Blue;
				
			L_00CD:
				
				{
				}
				if (Class.mau != "Gray")
				{
					goto L_00E9;
				}
				theListViewItem2.ForeColor = Color.Gray;
				
			L_00E9:
				
				{
				}
				theListViewItemArray = new ListViewItem[1];
				theListViewItemArray[0] = theListViewItem2;
				this.listView1.Items.AddRange (theListViewItemArray);
				this.listView1.Items.Remove (theListViewItem);
				
			L_0116:
				return;
			}
			
			private void listView1_SelectedIndexChanged (object sender, EventArgs e)
			
			{
				ListViewItem theListViewItem;
				if (this.listView1.SelectedItems.Count <= 0)
				{
					goto L_0041;
				}
				theListViewItem = this.listView1.SelectedItems[0];
				this.toolTip1.SetToolTip (((Control) this.listView1), theListViewItem.Text.ToString ());
				
			L_0041:
				return;
			}
			
			private void LoadCayBenh ()
			
			{
				ArrayList theArrayList;
				ArrayList theArrayList2;
				SqlConnection theSqlConnection;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				DataTable theDataTable;
				int i;
				int i2;
				SqlDataAdapter theSqlDataAdapter2;
				DataSet theDataSet2;
				DataTable theDataTable2;
				int i3;
				theArrayList = new ArrayList ();
				theArrayList2 = new ArrayList ();
				theSqlConnection = new SqlConnection (this.connStr);
				theSqlDataAdapter = new SqlDataAdapter ("select distinct(sktisn), sktname from vw_SickTree_Sicks", theSqlConnection);
				theDataSet = new DataSet ();
				int i4 = theSqlDataAdapter.Fill (theDataSet, "vw_SickTree_Sicks");
				if (theDataSet == null)
				{
					goto L_0183;
				}
				
			L_0042:
				
				{
				}
				theDataTable = theDataSet.Tables["vw_SickTree_Sicks"];
				i = 0;
				goto L_00A0;
				
			L_005A:
				
				{
				}
				int i5 = theArrayList.Add (theDataTable.Rows[i][0].ToString ());
				int i6 = theArrayList2.Add (theDataTable.Rows[i][1].ToString ());
				i++;
				
			L_00A0:
				
				{
				}
				if (i < theDataTable.Rows.Count)
				{
					goto L_005A;
				}
				i2 = 0;
				goto L_016A;
				
			L_00B8:
				
				{
				}
				this.insertParentNode (theArrayList2[i2].ToString ());
				theSqlDataAdapter2 = new SqlDataAdapter (string.Concat ("SELECT * FROM Sicks WHERE sktISN=", theArrayList[i2].ToString ()), theSqlConnection);
				theDataSet2 = new DataSet ();
				int i7 = theSqlDataAdapter2.Fill (theDataSet2, "Sicks");
				theDataTable2 = theDataSet2.Tables["Sicks"];
				i3 = 0;
				goto L_013D;
				
			L_0118:
				
				{
				}
				this.insertChildNode (theDataTable2.Rows[i3][2].ToString ());
				i3++;
				
			L_013D:
				
				{
				}
				if (i3 < theDataTable2.Rows.Count)
				{
					goto L_0118;
				}
				int i8 = this.treeView1.Nodes.Add (this.node);
				i2++;
				
			L_016A:
				
				{
				}
				if (i2 < theArrayList.Count)
				{
					goto L_00B8;
				}
				theSqlDataAdapter.Dispose ();
				theSqlConnection.Close ();
				
			L_0183:
				return;
			}
			
			private void treeView1_DoubleClick (object sender, EventArgs e)
			
			{
				string theString;
				int i;
				int i2;
				ListViewItem theListViewItem;
				int i3;
				ListViewItem theListViewItem2;
				ListViewItem[] theListViewItemArray;
				ListViewItem[] theListViewItemArray2;
				
			L_0000:
				try
				{
					theString = this.treeView1.SelectedNode.Text.ToString ();
					i = 0;
					i2 = 0;
					if (this.treeView1.SelectedNode.Parent.IsSelected)
					{
						goto L_0115;
					}
					i = this.listView1.Items.Count;
					if (i != 0)
					{
						goto L_0092;
					}
					theListViewItem = new ListViewItem (this.treeView1.SelectedNode.Text.ToString ());
					theListViewItem.ForeColor = Color.Gray;
					theListViewItemArray = new ListViewItem[1];
					theListViewItemArray[0] = theListViewItem;
					this.listView1.Items.AddRange (theListViewItemArray);
					goto L_0115;
					
				L_0092:
					
					{
					}
					i3 = 0;
					goto L_00C5;
					
				L_0097:
					
					{
					}
					if (theString != this.listView1.Items[i3].Text.ToString ())
					{
						goto L_00BF;
					}
					i2++;
					
				L_00BF:
					
					{
					}
					i3++;
					
				L_00C5:
					
					{
					}
					if (i3 < i)
					{
						goto L_0097;
					}
					if (i2 != 0)
					{
						goto L_0115;
					}
					theListViewItem2 = new ListViewItem (this.treeView1.SelectedNode.Text.ToString ());
					theListViewItem2.ForeColor = Color.Gray;
					theListViewItemArray2 = new ListViewItem[1];
					theListViewItemArray2[0] = theListViewItem2;
					this.listView1.Items.AddRange (theListViewItemArray2);
					
				L_0115:
					
					{
					}
				}
				catch
				{
					
				L_0117:
					
					{
					}
				}
				
			L_011A:
				return;
			}
			
		#endregion
	}
	
}

